<template>
  <div id="keepAnalysis">
    <h1 class="con-right-title">
      留存分析
    </h1>
    <keepTrend ref="keepTrend"></keepTrend>
    <keepTable ref="keepTable"></keepTable>
  </div>
</template>

<script>
import keepTrend from '@component/dataStatistics/keepAnalysis/com/keepTrend' //新增留存率趋势
import keepTable from '@component/dataStatistics/keepAnalysis/com/keepTable' //新增留存统计
import { saveScrollMixins } from '@/mixins/saveScroll'
export default {
  name: 'analyse',
  msg: '留存分析',
  /* mixins: [saveScrollMixins],*/
  components: {
    keepTrend,
    keepTable
  },

  data() {
    return {
      multipleSelection: [],
      powerStr: 'system:keepAnalysis:list', // 是否查询的标识
      canGetList: true, // 是否可以查询列表
      powerAry: [], // 可显示的权限
      canShowPage: false // 是否显示当前页面
    }
  },
  activated() {
    /* this.toTableScrollHeight()*/
  },
  mounted() {
    // 获取权限
    // this.getPower()
    /*    this.$nextTick(() => {
      setTimeout(() => {
        this.setTableScrollHeight()
      }, 1000)
    })*/
  },
  methods: {
    /* 获取权限 */
    getPower() {
      let _this = this
      let id = this.$route.query.mId
      this.getCurPageMenu(id).then((res) => {
        this.powerAry = res
        if (!res.includes(this.powerStr)) {
          this.canGetList = false
          this.alertPower(this.powerStr)
        } else {
          this.canShowPage = true
        }
      })
    }
  }
}
</script>

<style lang="less">
#keepAnalysis {
  .el-radio-button__inner {
    padding: 8px 20px;
  }
  .margin0 {
    margin-bottom: 0;
  }
  .echarts-title {
    font-size: 18px;
    font-weight: bold;
    color: #222;
    padding: 10px 0 10px 30px;
  }
}
</style>
